import request from '@/utils/request'

/**
 * 获取员工消费统计
 * @param {*} params
 * @returns
 */
export function getEmployeeConsume(params) {
  return request({
    url: '/api/app/employee/employee-consume-statistics',
    method: 'get',
    baseURL: public_config.labor_api,
    params
  })
}

/**
 * 获取员工列表信息
 * @param {*} params
 * @returns
 */
export function getEmployessList(params) {
  return request({
    url: '/api/app/employee',
    method: 'get',
    baseURL: public_config.labor_api,
    params
  })
}

/**
 * 获取岗位列表
 * @param {*} data
 * @returns
 */
export function getJobList(data) {
  return request({
    url: '/api/app/employee/get-job-list',
    method: 'post',
    baseURL: public_config.labor_api,
    data
  })
}
/**
 * 获取员工列表
 * @param {*} data
 * @returns
 */
export function getUserList(data) {
  return request({
    url: '/api/app/employee/get-user-list',
    method: 'post',
    baseURL: public_config.labor_api,
    data
  })
}

/**
 * 获取部门列表
 * @param {*} data
 * @returns
 */
export function getFindList(data) {
  return request({
    url: '/api/app/a-pIOAOrg/find-list',
    method: 'post',
    baseURL: public_config.labor_api,
    data
  })
}

/**
 * 获取卡号
 * @param {*} data
 * @returns
 */
export function UpdateCustomerCardNo(data) {
  return request({
    url: `/labor-protection-invoker/api/CardNiu/UpdateCustomerCardNo?user_no=${data.user_no}`,
    method: 'post',
    baseURL: public_config.base_api,
    data
  })
}

export function AutoGetUsers(data) {
  return request({
    url: '/labor-protection-invoker/api/OA/AutoGetUsers',
    method: 'post',
    baseURL: public_config.base_api,
    data
  })
}

export function AutoExecUsers(data) {
  return request({
    url: '/labor-protection-invoker/api/OA/AutoExecUsers',
    method: 'post',
    baseURL: public_config.base_api,
    data
  })
}
